#include"comm.hpp"
#include<unistd.h>

int main()
{ key_t k=getKey();//获得当前路径下开共享内存的key值
  printf("key: 0x%x\n",k);
  int shmid=getShm(k);//获取共享内存
  char *mem=(char*)attachShm(shmid);
  std::cout << "Data: " << mem << std::endl;
   detachShm(mem);
   delShm(shmid);
   return 0;

}